001 /* 002 * Copyright 2005-2006 Stephen J. McConnell. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 013 * implied. 014 * 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019 package net.dpml.metro; 020 021 import java.rmi.RemoteException; 022 023 import net.dpml.component.Model; 024 025 import net.dpml.metro.info.LifestylePolicy; 026 import net.dpml.metro.info.CollectionPolicy; 027 import net.dpml.metro.info.PartReference; 028 import net.dpml.metro.data.CategoryDirective; 029 030 import net.dpml.lang.Classpath; 031 032 /** 033 * The ComponentModel interface defines the remotely accessible aspects of a component 034 * configuration. 035 * 036 * @author <a href="http://www.dpml.net">Digital Product Meta Library</a> 037 * @version 1.0.0 038 */ 039 public interface ComponentModel extends Model 040 { 041 /** 042 * Return the current context model. 043 * 044 * @return the context model 045 * @exception RemoteException if a remote exception occurs 046 */ 047 ContextModel getContextModel() throws RemoteException; 048 049 /** 050 * Return the component name. 051 * @return the name 052 * @exception RemoteException if a remote exception occurs 053 */ 054 String getName() throws RemoteException; 055 056 /** 057 * Return the component implementation class name. 058 * 059 * @return the classname of the implementation 060 * @exception RemoteException if a remote exception occurs 061 */ 062 String getImplementationClassName() throws RemoteException; 063 064 /** 065 * Return the component classpath directive. 066 * 067 * @return the classpath directive for the component 068 * @exception RemoteException if a remote exception occurs 069 */ 070 Classpath getClasspath() throws RemoteException; 071 072 /** 073 * Return the component thread-safe status. 074 * 075 * @return the threadsafe status 076 * @exception RemoteException if a remote exception occurs 077 */ 078 boolean isThreadSafe() throws RemoteException; 079 080 /** 081 * Return the component lifestyle policy. 082 * 083 * @return the lifestyle policy value 084 * @exception RemoteException if a remote exception occurs 085 */ 086 LifestylePolicy getLifestylePolicy() throws RemoteException; 087 088 /** 089 * Return the current component collection policy. If null, the component 090 * type collection policy will be returned. 091 * 092 * @return a HARD, WEAK, SOFT or SYSTEM 093 * @exception RemoteException if a remote exception occurs 094 */ 095 CollectionPolicy getCollectionPolicy() throws RemoteException; 096 097 /** 098 * Return the component logging categories. 099 * @return the categories 100 * @exception RemoteException if a remote exception occurs 101 */ 102 CategoryDirective[] getCategoryDirectives() throws RemoteException; 103 104 /** 105 * Return the default set of internal part directives. 106 * @return the internal part directive array 107 * @exception RemoteException if a remote exception occurs 108 */ 109 PartReference[] getPartReferences() throws RemoteException; 110 111 } 112